﻿<%@ Page Language="C#" MasterPageFile="../masterPage/admin/LoginReg.master" AutoEventWireup="true"
    CodeFile="regPerson.aspx.cs" Inherits="User_login_reg" Title="个人用户注册" MaintainScrollPositionOnPostback="true"%>

<%@ MasterType VirtualPath="../masterPage/admin/LoginReg.master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="SalePartial" TagName="SecurityQuestion" Src="~/Controls/login/SecurityQuestion.ascx" %>
<%@ Register TagPrefix="SalePartial" TagName="AreaRelation" Src="~/Controls/login/AreaRelation.ascx" %>
<%@ Register TagPrefix="SalePartial" TagName="ServiceReserved" Src="~/Controls/login/ServiceReserved.ascx" %>
<%@ Register TagPrefix="SalePartial" TagName="CADListCommbox" Src="~/Controls/login/CADListCommbox.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../css/user.css" rel="stylesheet" type="text/css" />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
        <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior1" Validation-IsRequired="true"
            ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="无效的电子邮件地址">
            <TargetControls>
                <telerik:TargetInput ControlID="tbUsername" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="tbPassword" />
                <telerik:TargetInput ControlID="tbPwdConfirm" />
                <telerik:TargetInput ControlID="rtbSecurityAnswer" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxBehavior4" Validation-IsRequired="true"
            ErrorMessage="请输入您的答案" EmptyMessage="请输入您的答案" FocusedCssClass="inp ipt-focus">
            <TargetControls>
                <telerik:TargetInput ControlID="tbSecurityAnswer" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxBehavior2" Validation-IsRequired="true"
            ErrorMessage="请输入您的名字" EmptyMessage="请输入您的名字" FocusedCssClass="inp ipt-focus">
            <TargetControls>
                <telerik:TargetInput ControlID="tbFirstname" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:TextBoxSetting BehaviorID="TextBoxBehavior3" Validation-IsRequired="true"
            ErrorMessage="请输入您的姓氏" EmptyMessage="请输入您的姓氏" FocusedCssClass="inp ipt-focus">
            <TargetControls>
                <telerik:TargetInput ControlID="tbLastname" />
            </TargetControls>
        </telerik:TextBoxSetting>
        <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior3" ValidationExpression="[0-9]{11,}"
            EmptyMessage="请输入您的手机号码" FocusedCssClass="inp ipt-focus" ErrorMessage="请输入11位手机号码">
            <TargetControls>
                <telerik:TargetInput ControlID="tbCellphone" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
        <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior4" ValidationExpression="0[1-9]{2,3}-[0-9]{7,8}"
            EmptyMessage="请输入您的联系电话" FocusedCssClass="inp ipt-focus" ErrorMessage="电话号码格式不正确">
            <TargetControls>
                <telerik:TargetInput ControlID="tbPhone" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
        <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior5" ValidationExpression="[0-9]{6}"
            EmptyMessage="请输入邮政编码" FocusedCssClass="inp ipt-focus" ErrorMessage="邮政编码格式不正确">
            <TargetControls>
                <telerik:TargetInput ControlID="tbZipcode" />
            </TargetControls>
        </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>

   <script type="text/javascript">
      // <![CDATA[
        function showHideResetPwd(source, e) {
                 var Row = document.getElementById("createNewUser");
                 var btnNewPwd = document.getElementById("divbtnNewPwd").childNodes[1];
                 var tbPassword = document.getElementById("tdtbPassword").childNodes[1];
                 var tbPwdConfirm = document.getElementById("tdtbPasswordfirm").childNodes[1];

                 if (Row.style.display == 'none') {
                     Row.style.display = "";
                     btnNewPwd.value = "保留原密码";
                     tbPassword.disabled = false;
                     tbPassword.value = "";
                     tbPwdConfirm.disabled = false;
                     tbPwdConfirm.value = "";
                 }
                 else {
                     Row.style.display = "none";
                     btnNewPwd.text = "保留原密码";
                     tbPassword.disabled = true;
                     tbPassword.value = "PWD";
                     tbPwdConfirm.disabled = true;
                     tbPwdConfirm.value = "PWD";
                 }
             }
             // ]]>
   </script>

    <div class="main-cont-tit">
        <h2>
            请创建您的帐号</h2>
    </div>
    <table  class="cont-tab" cellspacing="0" cellpadding="0" style="table-layout: fixed">
        <!--用户名的处理 Start-->
        <tr id="tr_input_username">
            <td class="td1">
                E-mail(用户名):<span class="nes">*</span>
            </td>
            <td class="td2">
                <div class="fle">
                    <asp:TextBox ID="tbUsername" runat="server" CssClass="inp ipt-normal" Style="width: 205px;
                        font-weight: bold" MaxLength="30"></asp:TextBox><!--输入框3种状态 “ipt-normal”-正常，“ipt-focus”-获取焦点，“ipt-error”-正常， -->
                </div>
            </td>
            <td class="td3">
              <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
                                </telerik:RadAjaxLoadingPanel>
                        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                <asp:Button ID="btnCheckUsername" CausesValidation="false" runat="server" 
                    Text="检测"  CssClass="btn-jc fri" onclick="btnCheckUsername_Click" />
                <asp:Label ID="lblInvalidUsername" runat="server" Visible="false" ForeColor="#cc0000"></asp:Label>
            </telerik:RadAjaxPanel>
            </td>
            </tr>
     
         <tr id="createNewUser"  style="display:none">
            <td class="td1">
                原密 码:<span class="nes">*</span>
            </td>
            <td class="td2">
                <telerik:RadTextBox ID="tbPasswordOld" runat="server" CssClass="inp ipt-normal" MaxLength="16"
                    TextMode="Password"></telerik:RadTextBox><!--输入框3种状态 “ipt-normal”-正常，“ipt-focus”-获取焦点，“ipt-error”-正常， -->
            </td>
            <td class="td3">
            </td>
        </tr>

        <!--用户名的处理 Ent-->
        <tr>
            <td class="td1" >
                密 码:<span class="nes">*</span>
            </td>
            <td class="td2" id ="tdtbPassword">
                <asp:TextBox ID="tbPassword" runat="server" CssClass="inp ipt-normal" MaxLength="16"
                    TextMode="Password"></asp:TextBox><!--输入框3种状态 “ipt-normal”-正常，“ipt-focus”-获取焦点，“ipt-error”-正常， -->
            </td>
            <td class="td3">
                <div class="info">
                    <b id="password_ico_ok" class="ico-ok" title="正确" style="display: none"></b><b id="password_ico_err"
                        class="ico-error" title="错误" style="display: none"></b>
                    <!--正常提示 Start-->
                    <div id="div_password_rule" class="info-pop" style="display: none">
                        <div class="arr">
                        </div>
                        <div class="info-pop-t">
                            <b class="cr-l"></b><b class="cr-r"></b>
                        </div>
                        <div class="info-pop-c">
                            <div class="cont">
                                8～16个字符（字母、数字、特殊符号）,区分大小写<br />
                                <div class="fle">
                                    密码强度：<span class="Cred">弱</span></div>
                                <div class="psw-sinfo">
                                    <div id="div_passowrd_Strong" class="bar state0">
                                        <!-- 此div中 class state0 至 state4 依次从弱至强 -->
                                    </div>
                                </div>
                                <span class="fle Cblue">强</span>
                                <div class="clear">
                                </div>
                            </div>
                        </div>
                        <div class="info-pop-b">
                            <b class="cr-l"></b><b class="cr-r"></b>
                        </div>
                    </div>
                    <!--正常提示 End-->
                    <!--错误提示(下面的div增加了一个“I-error”调用) Start-->
                    <div id="div_password_err" class="info-pop I-error" style="display: none">
                        <div class="arr">
                        </div>
                        <div class="info-pop-t">
                            <b class="cr-l"></b><b class="cr-r"></b>
                        </div>
                        <div class="info-pop-c">
                            <div class="cont" id="div_password_err_info">
                            </div>
                        </div>
                        <div class="info-pop-b">
                            <b class="cr-l"></b><b class="cr-r"></b>
                        </div>
                    </div>
                    <!--错误提示 End-->
                </div>
                <div id = "divbtnNewPwd">
                  <asp:Button ID="btnNewPwd" CausesValidation="false" runat="server" 
                    Text="重设密码"    OnClientClick="showHideResetPwd(); return false;" />
                 </div>
            </td>
        </tr>
        <tr>
            <td class="td1">
                再次输入密码:<span class="nes">*</span>
            </td>
            <td class="td2" id ="tdtbPasswordfirm">
                <asp:TextBox ID="tbPwdConfirm" runat="server" CssClass="inp ipt-normal" MaxLength="16"
                    TextMode="Password"></asp:TextBox><!--输入框3种状态 “ipt-normal”-正常，“ipt-focus”-获取焦点，“ipt-error”-正常， -->
            </td>
            <td class="td3">
                <asp:CompareValidator ID="pwdCompare" runat="server" ErrorMessage="两次密码输入不一致" ControlToCompare="tbPassword"
                    ControlToValidate="tbPwdConfirm"></asp:CompareValidator>
            </td>
        </tr>
    </table>

    <div class="main-cont-tit">
        <div class="arr">
        </div>
        <h2>
            安全信息设置</h2>
        <span class="fle Cgray">（以下信息用来找回密码，请慎重填写）</span></div>
    <SalePartial:SecurityQuestion ID="securityQuestion" runat="server" />
    <div class="main-cont-tit">
        <div class="arr">
        </div>
        <h2>
            个人信息</h2>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel2">
        <table class="cont-tab" cellspacing="0" cellpadding="0" style="table-layout: fixed">
            <tr>
                <td class="td1">
                    职 位:&nbsp;
                </td>
                <td class="td2">
                    <telerik:RadTextBox ID="rtbPosition" runat="server" EmptyMessage="请输入您的职位" CssClass="inp ipt-normal"
                        FocusedStyle-CssClass="inp ipt-focus" MaxLength="20">
                    </telerik:RadTextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    姓:<span class="nes">*</span>
                </td>
                <td class="td2">
                    <asp:TextBox ID="tbLastname" runat="server" CssClass="inp ipt-normal" Width="120"
                        MaxLength="20"></asp:TextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    名:<span class="nes">*</span>
                </td>
                <td class="td2">
                    <asp:TextBox ID="tbFirstname" runat="server" CssClass="inp ipt-normal" Width="120"
                        MaxLength="20"></asp:TextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    联系电话:&nbsp;
                </td>
                <td class="td2">
                    <asp:TextBox ID="tbPhone" runat="server" CssClass="inp ipt-normal" Width="120"></asp:TextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    手机:&nbsp;
                </td>
                <td class="td2">
                    <asp:TextBox ID="tbCellphone" runat="server" CssClass="inp ipt-normal" Width="120"></asp:TextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    邮政编码:&nbsp;
                </td>
                <td class="td2">
                    <asp:TextBox ID="tbZipcode" runat="server" CssClass="inp ipt-normal" Width="120"></asp:TextBox>
                </td>
                <td class="td3">
                </td>
            </tr>
            <SalePartial:AreaRelation ID="areaRelation" runat="server" />
            <SalePartial:CADListCommbox ID="cadListCommbox" runat="server" />
        </table>

           <div class="main-cont-tit">
        <div class="arr">
     </div>
        <h2>愿意接受以下信息</h2>
        <span class="fle Cgray"></span></div>
    <table class="cont-tab" cellspacing="0" cellpadding="0" style="table-layout: fixed">
       <tr>
            <td class="td1">
                愿意接受以下信息:&nbsp;&nbsp;
            </td>
            <td class="td2" colspan="2" style="text-align: left;">
                <telerik:RadListBox ID="rlbNotification" runat="server" CheckBoxes="true">
                    <Items>
                        <telerik:RadListBoxItem Text="最新询价信息通知" Value="I" Checked="true" />
                        <telerik:RadListBoxItem Text="网站活动通知" Value="E" Checked="true" />
                        <telerik:RadListBoxItem Text="网站新闻" Value="N" Checked="true" />
                    </Items>
                </telerik:RadListBox>
            </td>
        </tr>
</table>

        <div class="main-cont-tit">
            <div class="arr">
            </div>
            <h2>
                注册验证</h2>
        </div>
        <table class="cont-tab" cellspacing="0" cellpadding="0" style="table-layout: fixed">
            <tr>
                <td class="td1">
                    &nbsp;
                </td>
                <td class="td2 codeImg">
                    <telerik:RadCaptcha ID="RadCaptchaReg" runat="server" ErrorMessage="您输入的字符不正确" CaptchaLinkButtonText="看不清？换一张"
                        EnableRefreshImage="true" CaptchaTextBoxLabel="请输入上边的字符" CaptchaTextBoxCssClass="inp ipt-normal">
                        <CaptchaImage BackgroundNoise="High" LineNoise="High" FontWarp="High" TextLength="5"
                            TextColor="Gray" BackgroundColor="White" />
                    </telerik:RadCaptcha>
                </td>
                <td class="td3">
                    &nbsp;
                </td>
            </tr>
        </table>
    </telerik:RadAjaxPanel>

 
    <div class="main-cont-tit">
        <div class="arr">
        </div>
        <h2>
            服务条款</h2>
    </div>

    <SalePartial:ServiceReserved ID="serviceReserved" runat="server" />

    <table class="cont-tab" cellspacing="0" cellpadding="0" style="table-layout: fixed">
        <tr>
            <td class="td3">
              <asp:ImageButton ID="ibtSupply"  runat="server" CssClass="btn-submit" ImageUrl="../images/backImg/ImageButtonSupply.png"
                    OnClick="ibtSupply_Click"  ToolTip="填写您企业更多商务信息, 完整度有助于供应商选择的优化, 帮助您获得更快、更准、更好的服务 "/>
            </td>
            <td class="td3">
                <asp:ImageButton ID="ibtPurchase"  runat="server" CssClass="btn-submit" ImageUrl="../images/backImg/ImageButtonPurchase.png"
                    OnClick="ibtPurchase_Click"  ToolTip="填写您企业更多商务信息, 完整度有助于采购商选择的优化, 帮助您获得更快、更准、更好的服务 "/>
                
            </td>
            <td class="td3">
              <asp:ImageButton ID="ImageButton2"  runat="server" CssClass="btn-submit" ImageUrl="../images/backImg/ImageButton1.png"
                    OnClick="ibtSubmit_Click"   ToolTip="完成注册 以后再填写供应商/采购商的信息吧 "/>
            </td>
        </tr>
    </table>
</asp:Content>
